//#include "stdafx.h"
#include "properties.h"

///////////////////////////////////////////////
// Originally ackmed's Code(Shopbot)
///////////////////////////////////////////////
const D2_PROPERTIE _properties_table[]=
{
	{0,1,8,0,0,0,32},//%+d to Strength"},
	{1,1,7,0,0,0,32},//%+d to Energy"},
	{2,1,7,0,0,0,32},//%+d to Dexterity"},
	{3,1,7,0,0,0,32},//%+d to Vitality"},
	{7,1,9,0,0,0,32},//%+d to Life"},
	{9,1,8,0,0,0,32},//%+d to Mana"},
	{11,1,8,0,0,0,32},//%+d to Maximum Stamina"},
	{16,1,9,0,0,0,0},//%+d%% Enhanced Defense"},
	{17,2,9,9,0,0,0},//%+d%% Enhanced Damage"},
	{18,1,9,0,0,0,0},//%+d%% Enhanced Minimum Damage"},
	{19,1,10,0,0,0,0},//%+d to Attack Rating"},
	{20,1,6,0,0,0,0},//%+d%% Increased Chance of Blocking"},
	{21,1,6,0,0,0,0},//%+d to Minimum Damage"},
	{22,1,7,0,0,0,0},//%+d to Maximum Damage"},
	{23,1,6,0,0,0,0},//%+d to Minimum Damage"},
	{24,1,7,0,0,0,0},//%+d to Maximum Damage"},
	{27,1,8,0,0,0,0},//Regenerate Mana %d%%"},
	{28,1,8,0,0,0,0},//Heal Stamina Plus %d%%"},
	{31,1,11,0,0,0,10},//%+d Defense"},
	{32,1,9,0,0,0,0},//%+d Defense vs. Missile"},
	{33,1,8,0,0,0,0},//%+d Defense vs. Melee"},
	{34,1,6,0,0,0,0},//Damage Reduced by %d"},
	{35,1,6,0,0,0,0},//Magic Damage Reduced by %d"},
	{36,1,8,0,0,0,0},//Damage Reduced by %d%%"},
	{37,1,8,0,0,0,0},//Magic Resist %+d%%"},
	{38,1,5,0,0,0,0},//%+d%% to Maximum Magic Resist"},
	{39,1,8,0,0,0,50},//Fire Resist %+d%%"},
	{40,1,5,0,0,0,0},//%+d%% to Maximum Fire Resist"},
	{41,1,8,0,0,0,50},//Lightning Resist %+d%%"},
	{42,1,5,0,0,0,0},//%+d%% to Maximum Lightning Resist"},
	{43,1,8,0,0,0,50},//Cold Resist %+d%%"},
	{44,1,5,0,0,0,0},//%+d%% to Maximum Cold Resist"},
	{45,1,8,0,0,0,50},//Poison Resist %+d%%"},
	{46,1,5,0,0,0,0},//%+d%% to Maximum Poison Resist"},
	{49,1,9,0,0,0,0},//%+d to Maximum Fire Damage"},
	{48,2,8,9,0,0,0},//%+d fire damage"},
	{50,2,6,10,0,0,0},//%+d lightning damage"},
	{53,1,9,0,0,0,0},//%d maximum magic damage"},
	{52,2,8,9,0,0,0},//%+d magic damage"},
//	{54,3,8,9,8,0,0},//%+d cold damage over %d seconds"},
	{54,3,8,9,8,0,0},//%+d cold damage"},
	{56,1,8,0,0,0,0},//%d seconds cold duration"},
	{58,1,10,0,0,0,0},//%d maximum poison damage per second"},
	{59,1,9,0,0,0,0},//%d seconds poison duration"},
	{57,3,10,10,9,0,0},//%+d poison damage over %d seconds"},
	{60,1,7,0,0,0,0},//%d%% Life stolen per hit"},
	{62,1,7,0,0,0,0},//%d%% Mana stolen per hit"},
	{67,1,7,0,0,0,30},//%d%% Faster Run/Walk"},
	{68,1,7,0,0,0,30},//%d%% Increased Attack Speed"},
	{73,1,8,0,0,0,0},//%+d Maximum Durability"},
	{74,1,6,0,0,0,30},//Replenish Life %+d"},
	{75,1,7,0,0,0,20},//Increase Maximum Durability %d%%"},
	{76,1,6,0,0,0,10},//Increase Maximum Life %d%%"},
	{77,1,6,0,0,0,10},//Increase Maximum Mana %d%%"},
	{78,1,7,0,0,0,0},//Attacker Takes Damage of %d"},
	{79,1,9,0,0,0,100},//%d%% Extra Gold from Monsters"},
	{80,1,8,0,0,0,100},//%d%% Better Chance of Getting Magic Items"},
	{81,1,7,0,0,0,0},//Knockback"},
	{82,1,9,0,0,0,20},//%d seconds duration"},
	{83,2,3,3,0,0,0},//%+d to %d Skill Levels"},
	{85,1,9,0,0,0,50},//%+d%% to Experience Gained"},
	{86,1,7,0,0,0,0},//%+d Life after each Kill"},
	{87,1,7,0,0,0,0},//Reduces All Vendor Prices %d%%"},
	{89,1,4,0,0,0,4},//%+d to Light Radius"},
	{91,1,8,0,0,0,100},//Requirements %+d%%"},
	{92,1,7,0,0,0,0},//Required Level %+d"},
	{93,1,7,0,0,0,20},//%d%% Increased Attack Speed"},
	{94,1,7,0,0,0,64},//Required Level %d%%"},
	{96,1,7,0,0,0,20},//%d%% Faster Run/Walk"},
	{97,2,9,6,0,0,0},//%+d to %d"},
	{99,1,7,0,0,0,20},//%d%% Faster Hit Recovery"},
	{102,1,7,0,0,0,20},//%d%% Faster Block Rate"},
	{105,1,7,0,0,0,20},//%d%% Faster Cast Rate"},
	{107,2,9,3,0,0,0},//%+d to Skill(%d) (??? Only)"},
	{108,1,1,0,0,0,0},//Slain Monsters Rest In Peace"},
	{110,1,8,0,0,0,20},//Poison Length Reduced by %d%%"},
	{111,1,9,0,0,0,20},//Adds %+d Damage"},
	{112,1,7,0,0,0,-1},//Hit Causes Monster to Flee %d%%"},
	{113,1,7,0,0,0,0},//Hit Blinds Target %+d"},
	{114,1,6,0,0,0,0},//%d%% Damage Taken Goes to Mana"},
	{115,1,1,0,0,0,0},//Ignore Target Defense"},
	{116,1,7,0,0,0,0},//-%d%% Target Defense"},
	{117,1,7,0,0,0,0},//Prevent Monster Heal"},
	{118,1,1,0,0,0,0},//Half Freeze Duration"},
	{119,1,9,0,0,0,20},//%d%% Bonus to Attack Rating"},
	{120,1,7,0,0,0,128},//%+d to Monster Defense Per Hit"},
	{121,1,9,0,0,0,20},//%d%% Damage to Demons"},
	{122,1,9,0,0,0,20},//%d%% Damage to Undead"},
	{123,1,10,0,0,0,128},//%+d to Attack Rating against Demons"},
	{124,1,10,0,0,0,128},//%+d to Attack Rating against Undead"},
	{125,1,1,0,0,0,0},//Throwable"},
	{126,2,3,3,0,0,0},//%+d to %d Skills"},
	{127,1,3,0,0,0,0},//%+d to All Skill Levels"},
	{128,1,5,0,0,0,0},//Attacker Takes Lightning Damage of %d"},
	{134,1,5,0,0,0,0},//Freezes Target"},
	{135,1,7,0,0,0,0},//%d%% Chance of Open Wounds"},
	{136,1,7,0,0,0,0},//%d%% Chance of Crushing Blow"},
	{137,1,7,0,0,0,0},//%+d Kick Damage"},
	{138,1,7,0,0,0,0},//%+d to Mana After Each Kill"},
	{139,1,7,0,0,0,0},//%+d Life after each Demon Kill"},
	{140,1,7,0,0,0,0},//%d%% Extra Bloody"},
	{141,1,7,0,0,0,0},//%d%% Deadly Strike"},
	{142,1,7,0,0,0,0},//%d%% Fire Absorb"},
	{143,1,7,0,0,0,0},//%+d Fire Absorb"},
	{144,1,7,0,0,0,0},//%d%% Lightning Absorb"},
	{145,1,7,0,0,0,0},//%+d Lightning Absorb"},
	{146,1,7,0,0,0,0},//%d%% Magic Absorb"},
	{147,1,7,0,0,0,0},//%+d Magic Absorb"},
	{148,1,7,0,0,0,0},//%d%% Cold Absorb"},
	{149,1,7,0,0,0,0},//%+d Cold Absorb"},
	{150,1,7,0,0,0,0},//Slows Target by %d%%"},
	{151,2,9,5,0,0,0},//Level %d %d Aura When Equipped"},
	{152,1,1,0,0,0,0},//Indestructible"},
	{153,1,1,0,0,0,0},//Cannot Be Frozen"},
	{154,1,7,0,0,0,20},//%d%% Slower Stamina Drain"},
	{155,2,10,7,0,0,0},//%d%% Reanimate As: %d"},
	{156,1,7,0,0,0,0},//Piercing Attack [%d]"},
	{157,1,7,0,0,0,0},//Fires Magic Arrows"},
	{158,1,7,0,0,0,0},//Fires Explosive Arrows"},
	{159,1,6,0,0,0,0},//%+d to Minimum Damage"},
	{160,1,7,0,0,0,0},//%+d to Maximum Damage"},
	{188,2,16,3,0,0,0},//%+d SkillTable(%d) (??? Only)"},
	{194,1,4,0,0,0,0},//Increased Sockets by %d"},
	{195,3,6,10,7,0,0},//%d%% Chance to cast Level %d %d on attack"},
	{196,3,6,10,7,0,0},//%d%% Chance to cast Level %d %d When You Kill an Enemy"},
	{197,3,6,10,7,0,0},//%d%% Chance to cast Level %d %d When You Die"},
	{198,3,6,10,7,0,0},//%d%% Chance to cast Level %d %d on striking"},
	{199,3,6,10,7,0,0},//%d%% Chance to cast Level %d %d When You Level Up"},
	{201,3,6,10,7,0,0},//%d%% Chance to cast Level %d %d when struck"},
	{204,4,6,10,8,8,0},//Level %d %d (%d/%d Charges)"},
	{214,1,6,0,0,0,0},//%+d to Defense (Based on Character Level)"},
	{215,1,6,0,0,0,0},//%+d%% to Defense (Based on Character Level)"},
	{216,1,6,0,0,0,0},//%+d to Life (Based on Character Level)"},
	{217,1,6,0,0,0,0},//%+d to Mana (Based on Character Level)"},
	{218,1,6,0,0,0,0},//%+d to Maximum Damage (Based on Character Level)"},
	{219,1,6,0,0,0,0},//%+d%% to Maximum Damage (Based on Character Level)"},
	{220,1,6,0,0,0,0},//%+d to Strength (Based on Character Level)"},
	{221,1,6,0,0,0,0},//%+d to Dexterity (Based on Character Level)"},
	{222,1,6,0,0,0,0},//%+d to Energy (Based on Character Level)"},
	{223,1,6,0,0,0,0},//%+d to Vitality (Based on Character Level)"},
	{224,1,6,0,0,0,0},//%+d to Attack Rating (Based on Character Level)"},
	{225,1,6,0,0,0,0},//%d%% Bonus to Attack Rating (Based on Character Level)"},
	{226,1,6,0,0,0,0},//%+d to Maximum Cold Damage (Based on Character Level)"},
	{227,1,6,0,0,0,0},//%+d to Maximum Fire Damage (Based on Character Level)"},
	{228,1,6,0,0,0,0},//%+d to Maximum Lightning Damage (Based on Character Level)"},
	{229,1,6,0,0,0,0},//%+d to Maximum Poison Damage (Based on Character Level)"},
	{230,1,6,0,0,0,0},//%+d to Maximum Cold Resist (Based on Character Level)"},
	{231,1,6,0,0,0,0},//%+d to Maximum Fire Resist (Based on Character Level)"},
	{232,1,6,0,0,0,0},//%+d to Maximum Resist Damage (Based on Character Level)"},
	{233,1,6,0,0,0,0},//%+d to Maximum Poison Resist (Based on Character Level)"},
	{234,1,6,0,0,0,0},//%+d to Cold Absorb (Based on Character Level)"},
	{235,1,6,0,0,0,0},//%+d to Fire Absorb (Based on Character Level)"},
	{236,1,6,0,0,0,0},//%+d to Lightning Absorb (Based on Character Level)"},
	{237,1,6,0,0,0,0},//%+d to Poison Absorb (Based on Character Level)"},
	{238,1,5,0,0,0,0},//Attacker Takes Damage of %d (Based on Character Level)"},
	{239,1,6,0,0,0,0},//%d%% Extra Gold (Based on Character Level)"},
	{240,1,6,0,0,0,0},//%d%% Better Chance of Getting Magic Items (Based on Character Level)"},
	{241,1,6,0,0,0,0},//Heal Stamina Plus %d%% (Based on Character Level)"},
	{242,1,6,0,0,0,0},//%+d to Maximum Stamina (Based on Character Level)"},
	{243,1,6,0,0,0,0},//%d%% Damage to Demons (Based on Character Level)"},
	{244,1,6,0,0,0,0},//%d%% Damage to Undead (Based on Character Level)"},
	{245,1,6,0,0,0,0},//%d%% Bonus to Attack Rating Against Demons (Based on Character Level)"},
	{246,1,6,0,0,0,0},//%d%% Bonus to Attack Rating Against Undead (Based on Character Level)"},
	{247,1,6,0,0,0,0},//%d%% Crushing Blow (Based on Character Level)"},
	{248,1,6,0,0,0,0},//%d%% Open Wounds (Based on Character Level)"},
	{249,1,6,0,0,0,0},//%d Kick Damage (Based on Character Level)"},
	{250,1,6,0,0,0,0},//%d%% Deadly Strike (Based on Character Level)"},
	{252,1,6,0,0,0,0},//Repairs 1 durability in %d seconds"},
	{253,1,6,0,0,0,0},//Replenishes Quantity"},
	{254,1,8,0,0,0,0},//Increased Stack Size"},
	{273,3,12,3,7,0,0},//%+d to Max Damage %d %d"},
	{305,1,8,0,0,0,50},//%+d%% to Enemy Cold Resistance"},
	{306,1,8,0,0,0,50},//%+d%% to Enemy Fire Resistance"},
	{307,1,8,0,0,0,50},//%+d%% to Enemy Lightning Resistance"},
	{308,1,8,0,0,0,50},//%+d%% to Enemy Poison Resistance"},
	{329,1,9,0,0,0,50},//%+d%% to Fire Skill Damage"},
	{330,1,9,0,0,0,50},//%+d%% to Lightning Skill Damage"},
	{331,1,9,0,0,0,50},//%+d%% to Cold Skill Damage"},
	{332,1,9,0,0,0,50},//%+d%% to Poison Skill Damage"},
	{333,1,8,0,0,0,0},//-%d%% to Enemy Fire Resistance"},
	{334,1,8,0,0,0,0},//-%d%% to Enemy Lightning Resistance"},
	{335,1,8,0,0,0,0},//-%d%% to Enemy Cold Resistance"},
	{336,1,8,0,0,0,0},//-%d%% to Enemy Poison Resistance"},
	{356,1,2,0,0,0,0},//Quest Item Difficulty: %d"},
	{511,0,0,0,0,0,0},//END OF PROPERTY LIST"}
};

const D2_PROPERTIE* GetPropertiesRow(int id)
{
	//if(n < itemstatcost_count) 
	//{
	//	return(&itemstatcost[n]);
	//}
	for(int i=0;i<sizeof(_properties_table)/sizeof(D2_PROPERTIE);i++)
	{
		if(_properties_table[i].id==id) return _properties_table+i;
	}

	return 0;
}